package com.news.news.web;


import com.news.news.modle.Collect;
import com.news.news.modle.Comment;
import com.news.news.service.CollectService;
import com.news.news.service.CommentService;
import com.news.news.util.CommonResult;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(path = "/userApi/CollectCtl")
public class CollectController {


    @Resource
    CollectService collectService;
    /**
     * 获取用户评论信息
     * @param
     * @return
     */
    @RequestMapping(value = "/collectList")
    public CommonResult collectList(@RequestHeader("userToken") String token) {
        List<Collect> list = collectService.collectList(token);
        CommonResult commonResult=new CommonResult(200,list,"成功");
        return commonResult;
    }
}
